﻿using efcoredemo.Entity;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace efcoredemo
{
    public class TestContext : DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-G2KO24B;Initial Catalog=efcoretest;Integrated Security=True");
        }

        public DbSet<User> Users { get; set; }
        public DbSet<Dept> Depts { get; set; }
        public DbSet<UserCompany> UserCompanys { get; set; }
        public DbSet<UserDept> UserDepts { get; set; }
    }
}
